if let cost = Double(textField.text!)

welcome to shbcf.ru